
package org.darcy.entity.privilege;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

@Schema(description="SysUserDataRange: 用户数据权限，对应数据管理范围")
@TableName(value = "sys_user_data_range")
@Getter
@Setter
public class SysUserDataRange implements Serializable {

	private static final long serialVersionUID = 1L;

	@Schema(description = "")
	@TableId(type = IdType.AUTO)
	private Integer id;

	@Schema(description = "用户id")
	@TableField(value = "`user_id`")
	private Integer userId;

	@Schema(description = "角色id, 1:超级管理员；2：分级管理员；3：部门管理员")
	@TableField(value = "`role_id`")
	private Integer roleId;

	@Schema(description = "部门id，多个")
	@TableField(value = "`dept_id`")
	private String deptId;

	@Schema(description = "创建时间")
	@TableField(value = "`create_time`")
	private Date createTime;

	@Schema(description = "更新时间")
	@TableField(value = "`update_time`")
	private Date updateTime;

	@Schema(description = "删除标识0：删除1：存在")
	@TableField(value = "`del_flag`")
	private Integer delFlag;

	// 扩展属性
	@Schema(description = "用户姓名")
	@TableField(exist = false)
	private String userName;

	@Schema(description = "部门名称")
	@TableField(exist = false)
	private String deptName;

	@Schema(description = "部门名称列表")
	@TableField(exist = false)
	private List<String> deptNameList;

}
